import {QlNotificationService} from "qloud-angular/package/notification/notification.service";
import { Component, OnInit,Input,Output, EventEmitter,ViewChild, ViewContainerRef } from '@angular/core'
import { FormGroup, FormBuilder } from '@angular/forms'
import { ModalService } from '@app/shared/utils'
import { NetService, PageService } from '@app/core/http'
import { ApiService } from '../../services/dashboard.service'
import { QlMessageService } from 'qloud-angular'
import { Router } from '@angular/router'


@Component({
  selector: 'app-invest-type',
  templateUrl: './invest-type.component.html',
  styleUrls: ['./invest-type.component.css'],
  providers: [ModalService, PageService, ApiService]
})
export class InvestTypeComponent implements OnInit {
    @Input()  hdata7: any; // 接收父组件charts的高度值
    @Input() type  = 'success';
    @Output() output = new EventEmitter();

    public res:any = ''
    public factors = []
    public products = []
    public campaigns = []

    index ='1';
    tabIndex = '1';
    oneIndex = '1';

    constructor(private notify: QlNotificationService, private apiService: ApiService,
      private fb: FormBuilder,
      public modal: ModalService,
      public pageService: PageService,
      private message: QlMessageService,
      private router: Router) {
    }

    /*查询*/
    query() {
      // 客户号、客户名称、客户等级、性别、年龄、手机号、AUM、资产余额、上日资产变动、年累计资产变动
      // this.loadEchartTimeout(res);
    }

    handle(index: string): void {
      this.tabIndex = index;
    }
    oneHandle(index: string): void {
      this.oneIndex = index;
    }

    ngOnInit() {
        this.query();
        this.apiService.getinfoList().subscribe(data => {
          this.res = data
        })
        this.apiService.getresultsList().subscribe(data => {
          this.factors = data
        })
        this.apiService.getproductList().subscribe(data => {
          this.products = data
        })
        this.apiService.getactivityList().subscribe(data => {
          this.campaigns = data
        })
    }
}
